Skip to content

Fix rendering of code-cell within sphinx_design tab groups - #724

Closed
VeckoTheGecko wants to merge 5 commits into
executablebooks:mainfrom
VeckoTheGecko:fix
Closed

Fix rendering of code-cell within sphinx_design tab groups#724
VeckoTheGecko wants to merge 5 commits into
executablebooks:mainfrom
VeckoTheGecko:fix

Conversation

@VeckoTheGecko

Copy link
Copy Markdown

Fixes #723

Changes:

  • Updates the rendering
  • Adds sphinx_design as a test dependency
  • Run pytest --regen-all to regenerate the data files

The changes in the data files are not visually different (mainly OEF newline, and updated hashes).

I hope that the reading update is correct! (it was LLM driven, but the change fixes the doc issue I was having).

@VeckoTheGecko

Copy link
Copy Markdown
Author

Hmmm, just saw

"Found an unexpected `code-cell` or `raw-cell` directive. "
"Either this file was not converted to a notebook, "
"because Jupytext header content was missing, "
"or the `code-cell` was not converted, because it is nested. "
"See https://myst-nb.readthedocs.io/en/latest/authoring/text-notebooks.html "
"for more information."

Maybe my PR and issue is out of scope for this project

@VeckoTheGecko

Copy link
Copy Markdown
Author

I'm going to close this. I'm not confident in this fix and don't know if the original issue is actually intentional behaviour

VeckoTheGecko added a commit to pydata/xarray that referenced this pull request Jul 31, 2026
* Add myst_nb

* Migrate doc/getting-started-guide/quick-overview.md

* Migrate doc/get-help/faq.md

* Migrate doc/internals/zarr-encoding-spec.md

* Migrate doc/user-guide/hierarchical-data.md

* Migrate doc/user-guide/reshaping.md

* Migrate doc/user-guide/plotting.md

* Migrate doc/user-guide/interpolation.md

* Migrate doc/user-guide/combining.md

* Migrate doc/user-guide/groupby.md

* Fix references

* Migrate doc/user-guide/weather-climate.md

* Migrate doc/user-guide/testing.md

* Migrate doc/user-guide/terminology.md

* Fix cross-links

* Migrate doc/user-guide/time-series.md

* Migrate doc/user-guide/data-structures.md

* Migrate doc/internals/internal-design.md

* Migrate doc/internals/how-to-create-custom-index.md

* Fix cross-links

* Migrate doc/internals/duck-arrays-integration.md

* Migrate doc/internals/time-coding.md

* Fix cross-linking

* Migrate doc/internals/extending-xarray.md

* Fix path

* Replace jupyter-input and jupyter-output with python code blocks and text blocks

* Migrate whats-new.md code blocks

* Migrate doc/internals/how-to-add-new-backend.rst

* Migrate doc/user-guide/complex-numbers.md

* Move from tabs to sections

Doesn't look like myst-nb supports code cells in tabs executablebooks/MyST-NB#724

* Remove myst_parser

Handled by myst_nb

* Fix crosslinks

* Migrate doc/user-guide/dask.md

* Migrate doc/user-guide/duckarrays.md

* Migrate doc/user-guide/indexing.md

* Migrate doc/user-guide/io.md

* Fix tab groups

* Migrate doc/user-guide/pandas.md

* Fix cross-linking and code

* Replace `hide-input` with `remove-input`

remove-input actually removes the input instead of putting it in a dropdown

* Replace `hide-output` with `remove-output`

remove-output actually removes the output instead of putting it in a dropdown

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix admonitions

Do pre-commit separately

* Fix admonition wrapping and make code blocks python

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* set 'nb_execution_timeout = 60'

* Set nb_execution_excludepatterns instead

* Fix path

* Delete nbsphinx

* Fix unnest code cells from admonitions

Was getting the following errors:

/Users/Hodgs004/coding/repos/xarray/doc/user-guide/plotting.md:392: WARNING: Found an unexpected `code-cell` or `raw-cell` directive. Either this file was not converted to a notebook, because Jupytext header content was missing, or the `code-cell` was not converted, because it is nested. See https://myst-nb.readthedocs.io/en/latest/authoring/text-notebooks.html for more information. [mystnb.nbcell]

* Fix level headers and cross-references

* Merge code cells

These cells were visually merged in prior docs.

* Format fix

* Merge code blocks

* Merge cells

* fix links

* Review copy edits

* Fix formatting

* Fix crossref

* Remove nbsphinx config

* Update whats-new

* Remove nbsphinx metadata from notebook and update conf.py

* Patch ROMS_ocean_model.ipynb metadata

To extend execution time https://myst-nb.readthedocs.io/en/latest/computation/execute.html#execution-timeout

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
charles-turner-1 pushed a commit to charles-turner-1/xarray that referenced this pull request Jul 31, 2026
* Add myst_nb

* Migrate doc/getting-started-guide/quick-overview.md

* Migrate doc/get-help/faq.md

* Migrate doc/internals/zarr-encoding-spec.md

* Migrate doc/user-guide/hierarchical-data.md

* Migrate doc/user-guide/reshaping.md

* Migrate doc/user-guide/plotting.md

* Migrate doc/user-guide/interpolation.md

* Migrate doc/user-guide/combining.md

* Migrate doc/user-guide/groupby.md

* Fix references

* Migrate doc/user-guide/weather-climate.md

* Migrate doc/user-guide/testing.md

* Migrate doc/user-guide/terminology.md

* Fix cross-links

* Migrate doc/user-guide/time-series.md

* Migrate doc/user-guide/data-structures.md

* Migrate doc/internals/internal-design.md

* Migrate doc/internals/how-to-create-custom-index.md

* Fix cross-links

* Migrate doc/internals/duck-arrays-integration.md

* Migrate doc/internals/time-coding.md

* Fix cross-linking

* Migrate doc/internals/extending-xarray.md

* Fix path

* Replace jupyter-input and jupyter-output with python code blocks and text blocks

* Migrate whats-new.md code blocks

* Migrate doc/internals/how-to-add-new-backend.rst

* Migrate doc/user-guide/complex-numbers.md

* Move from tabs to sections

Doesn't look like myst-nb supports code cells in tabs executablebooks/MyST-NB#724

* Remove myst_parser

Handled by myst_nb

* Fix crosslinks

* Migrate doc/user-guide/dask.md

* Migrate doc/user-guide/duckarrays.md

* Migrate doc/user-guide/indexing.md

* Migrate doc/user-guide/io.md

* Fix tab groups

* Migrate doc/user-guide/pandas.md

* Fix cross-linking and code

* Replace `hide-input` with `remove-input`

remove-input actually removes the input instead of putting it in a dropdown

* Replace `hide-output` with `remove-output`

remove-output actually removes the output instead of putting it in a dropdown

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix admonitions

Do pre-commit separately

* Fix admonition wrapping and make code blocks python

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* set 'nb_execution_timeout = 60'

* Set nb_execution_excludepatterns instead

* Fix path

* Delete nbsphinx

* Fix unnest code cells from admonitions

Was getting the following errors:

/Users/Hodgs004/coding/repos/xarray/doc/user-guide/plotting.md:392: WARNING: Found an unexpected `code-cell` or `raw-cell` directive. Either this file was not converted to a notebook, because Jupytext header content was missing, or the `code-cell` was not converted, because it is nested. See https://myst-nb.readthedocs.io/en/latest/authoring/text-notebooks.html for more information. [mystnb.nbcell]

* Fix level headers and cross-references

* Merge code cells

These cells were visually merged in prior docs.

* Format fix

* Merge code blocks

* Merge cells

* fix links

* Review copy edits

* Fix formatting

* Fix crossref

* Remove nbsphinx config

* Update whats-new

* Remove nbsphinx metadata from notebook and update conf.py

* Patch ROMS_ocean_model.ipynb metadata

To extend execution time https://myst-nb.readthedocs.io/en/latest/computation/execute.html#execution-timeout

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code cells missing when used in tab-groups

1 participant